Networks enable computers and other devices to communicate. For example, networks can carry data representing video, audio, e-mail, and so forth. Typically, data sent across a network is carried by smaller messages known as packets. By analogy, a packet is much like an envelope you drop in a mailbox. A packet typically includes payload and a header. The packet's payload is analogous to the letter inside the envelope. The packet's header is much like the information written on the envelope itself. The header can include information to help network devices handle the packet appropriately.
A number of network protocols (e.g., “a protocol stack”) cooperate to handle the complexity of network communication. For example, a transport protocol known as Transmission Control Protocol (TCP) provides applications with simple mechanisms for establishing a connection and transferring data across a network. Transparently to the applications, TCP handles a variety of communication issues such as data retransmission, adapting to network traffic congestion, and so forth.
To provide these services, TCP operates on packets known as segments. Generally, a TCP segment travels across a network within (“encapsulated” by) a larger packet such as an Internet Protocol (IP) datagram. Frequently, an IP datagram is further encapsulated by an even larger packet such as an Ethernet frame. The payload of a TCP segment carries a portion of a stream of data sent across a network by an application. A receiver can restore the original stream of data by reassembling the received segments. To permit reassembly and acknowledgment (ACK) of received data back to the sender, TCP associates a sequence number with each payload byte.
The current state for each TCP connection is stored in a block of data known as a Transmission Control Block (TCB). The TCB includes data such as the next expected sequence number, the last sequence number transmitted, and so forth. A connection's TCB is typically read and, potentially, updated with each TCP segment received and transmitted.
Networks.